Create a replica index
Replica indices let you use different ranking strategies, such as sorting.
Algolia uses one ranking strategy per index. If you want to use different rankings for the same data, you can use replica indices.
Standard and virtual replicas
Standard replicas are exact copies of your index. They let you to have a completely different configuration of your index, while keeping the data in sync with your primary index.
Virtual replicas don’t copy the data from their primary index. They’re more efficient than standard replica, but you can only change a subset of the index settings. Virtual replicas are optimized for relevant sorting.
Virtual replicas aren’t available on the Grow plan.
Naming replica indices
To help you identify your replica indices,
you should adopt a naming pattern,
such as {primaryIndex}_{sortingAttribute}_{asc_or_desc}
.
For example, products_price_desc
is a replica index of your products
index,
where the results are sorted by the price
attribute in descending order.
Create replica indices in the dashboard
-
Go to the Algolia dashboard and select your Algolia application.
-
On the left sidebar, select Search.
-
Select your Algolia index:
-
On the Replicas tab, click Create Replica Index.
-
In the Create a new replica dialog, select Standard Replica (default) or Virtual Replica for Relevant Sort, enter a name for your replica, and click Create replica.
-
You can add multiple replicas at once.
-
Click Review and Save Settings.
Create replica indices with the API
To create replica indices,
use the replicas
setting in your primary index.
To create virtual indices, use the virtual
modifier for the replica index name:
Next steps
After creating your replica indices, you can change their settings—for example, by adding a attribute for sorting.